<div class="widget-title">
  <h3>合同填写</h3>
</div>
<div class="widget-content">
  <form role="form" class="form-horizontal" name="form"  ng-submit="update(contract)">
    <div class="control-group">
      <label class="control-label">合同编号</label>
      <div class="controls">
        <input type="text" ng-model="contract.number" placeholder="必填项" required>
      </div>
    </div>

    <div class="control-group">
      <label class="control-label">合同类型</label>
      <div class="controls">
        <select ng-model="contract.contract_type_id" required>
          <option ng-repeat="c in contract_types" value="{{c.id}}">{{c.name}}</option>
        </select>
      </div>
    </div>

    <div class="control-group">
      <label class=" control-label">合同签约日期</label>
      <div class="controls">
        <input type="text" ng-model="contract.valid_from" placeholder="必填项" required onClick="WdatePicker({onpicked: function(){$(this).trigger('change')}});" class="input-time">
      </div>
    </div>
    <div class="control-group">
      <label class=" control-label">合同到期时间</label>
      <div class="controls">
        <input type="text" ng-model="contract.valid_end" placeholder="必填项" required onClick="WdatePicker({onpicked: function(){$(this).trigger('change')}});" class="input-time">
      </div>
    </div>

    <div class="form-actions">
      <input type="submit" class="btn bg-green" value="保存">
      <input type="submit" class="btn bg-green" value="取消">
    </div>
  </form>
</div>